package com.nbot.server.mapper.master;

import com.nbot.server.domain.KeyParameterLogDO;
import com.nbot.server.domain.KeyParameterMonthDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 重要参数记录
 *
 * @author nbot
 * @email nbot@163.com
 * @date 2018-06-17 15:33:14
 */
@Mapper
public interface KeyParameterLogMapper {

    KeyParameterLogDO get(Long autoId);

    List<KeyParameterLogDO> list(Map<String, Object> map);

    int count(Map<String, Object> map);

    int save(KeyParameterLogDO keyParameterLog);

    int update(KeyParameterLogDO keyParameterLog);

    int remove(Long autoId);

    int batchRemove(Long[] autoIds);

    List<KeyParameterMonthDO> fingBetween(@Param("kpAutoId") long kpAutoId, @Param("sDateTimestamp") long sDateTimestamp, @Param("eDateTimestamp") long eDateTimestamp);

    /**
     * 删除小于timestamp的记录
     * @param timestamp
     * @return
     */
    int deleteLt(@Param("timestamp") long timestamp);

}
